package com.ruoyi.business.service;

import com.ruoyi.business.app.vo.AppPurchaseVo;
import com.ruoyi.business.domain.HcxMerchantProduct;
import com.ruoyi.business.vo.HcxMerchantProductVo;
import com.ruoyi.business.bo.HcxMerchantProductQueryBo;
import com.ruoyi.business.bo.HcxMerchantProductAddBo;
import com.ruoyi.business.bo.HcxMerchantProductEditBo;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * 商家商品Service接口
 *
 * @author wsdz
 * @date 2022-08-18
 */
public interface IHcxMerchantProductService extends IServicePlus<HcxMerchantProduct> {
	/**
	 * 查询单个
	 * @return
	 */
	HcxMerchantProductVo queryById(Long id);

	/**
	 * 查询列表
	 */
    TableDataInfo<HcxMerchantProductVo> queryPageList(HcxMerchantProductQueryBo bo);

	/**
	 * 查询列表
	 */
	List<HcxMerchantProductVo> queryList(HcxMerchantProductQueryBo bo);

	/**
	 * 根据新增业务对象插入商家商品
	 * @param bo 商家商品新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(HcxMerchantProductAddBo bo);

	/**
	 * 根据编辑业务对象修改商家商品
	 * @param bo 商家商品编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(HcxMerchantProductEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 导入数据
     *
     * @param hcxMerchantProductList 排污口水质数据
     * @return String
     */
	String importHcxMerchantProduct(List<HcxMerchantProductVo> hcxMerchantProductList);


	AppPurchaseVo purchase(HttpServletRequest request, Long productId, Long couponId, String payType) throws Exception;
}
